﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGRapidForm.Permission.Service.Interface;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Permission.Component;
using Microsoft.Practices.Unity;

namespace SGRapidForm.Permission.Service
{
    public partial class PermissionService : IPermissionService
    {
        [Dependency]
        public ShortcutsComponent ShortcutsComponent
        { get; set; }

        public bool Shortcuts_Add(string userKeyid, string pageKeyid)
        {
            return this.ShortcutsComponent.Shortcuts_Add(userKeyid, pageKeyid);
        }

        public bool Shortcuts_Delete(string userKeyid, string pageKeyid)
        {
            return this.ShortcutsComponent.Shortcuts_Delete(userKeyid, pageKeyid);
        }

        public List<PermissionDetails> Shortcuts_GetAllByUserKeyid(string userKeyid, string filterConditions)
        {
            return this.ShortcutsComponent.Shortcuts_GetAllByUserKeyid(userKeyid, filterConditions);
        }

        public List<PageEntity> Shortcuts_GetByUserKeyid(string userKeyid)
        {
            return this.ShortcutsComponent.Shortcuts_GetByUserKeyid(userKeyid); 
        }

        public List<PermissionDetails> Shortcuts_GetListByUserKeyid(string userKeyid, string filterConditions)
        {
            return this.ShortcutsComponent.Shortcuts_GetListByUserKeyid(userKeyid, filterConditions);
        }
    }
}
